import axios from "@/utils/request";
import Vue from "vue";

const Api = {
    getRightmenu: "/user/rightmenu",
    dofood: "/user/dofood",
    clearShopCar: "/user/clearShopCar",
    doTaoCan: "/user/doCombo",
    change: "/user/changeCar",
    commitOrder:"/user/commitOrder",
    getTable: "/user/all-table",
    chooseTable: "/user/table",
    changeTable: "/user/changeTable",
  };

  export function getTable() {
    return axios({
      url: Api.getTable,
      method: "get",
    });
  }
  
  export function chooseTable(parameter) {
    return axios({
      url: Api.chooseTable,
      method: "post",
      data:parameter,
    });
  }
  export function changeTable(parameter) {
    return axios({
      url: Api.changeTable,
      method: "get",
      params:parameter
    });
  }
  export function getRightmenu() {
    return axios({
      url: Api.getRightmenu,
      method: "get",
    });
  }
  

  export function commitOrder(parameter) {
    return axios({
      url: Api.commitOrder,
      method: "post",
      data:parameter
    });
  }

  export function dofood(parameter) {
    return axios({
      url: Api.dofood,
      method: "post",
      data:parameter,
    });
  }

  export function clearShopCar() {
    return axios({
      url: Api.clearShopCar,
      method: "get",
    });
  }

  export function doTaoCan(parameter) {
    return axios({
      url: Api.doTaoCan,
      method: "post",
      data:parameter,
    });
  }
  
  export function change(parameter) {
    return axios({
      url: Api.change,
      method: "post",
      data:parameter,
    });
  }
  
